package com.xuhuan.practice.dto.user;

import com.xuhuan.practice.dto.common.BaseDTO;
import com.xuhuan.practice.validator.group.UpdateGroup;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

/**
 * @author: huan.xu
 * @create: 2024/6/13 22:20
 * @description: 更新用户信息dto
 **/
@Data
public class UserUpdateInfoDTO extends BaseDTO {

  @NotEmpty(groups = UpdateGroup.class)
  @Pattern(regexp = "^\\S{1,10}$", groups = UpdateGroup.class)
  private String nickname;

  @Email(groups = UpdateGroup.class)
  @NotEmpty(groups = UpdateGroup.class)
  private String email;
}
